# -*- coding: utf-8 -*-
# @desc: 选股的抽象类
# @file: base_selector.py
# @author: Lin Jackey Lyu (me@linlyu.com)
# @date: 2019/2/27 11:14
import abc
from collections import namedtuple

# amount 正负分别代表了股票的买入和卖出
Order = namedtuple("Order", field_names=["stock", "price", "amount"])


class AbstractSelector(metaclass=abc.ABCMeta):
    def __init__(self) -> None:
        super().__init__()

    @abc.abstractmethod
    def select(self, day) -> list:
        """
        按照某种自定义的逻辑，选出 `day` 日的股票
        :param day:
        :return:
        """
        pass
